1. Field of the Invention
The present invention relates to a motor control device, an image forming apparatus, and non-transitory computer-readable medium.
2. Description of the Related Art
An image forming apparatus, such as a printer, that forms an image on a media sheet conveyed by a sheet conveying unit using an inkjet or electrophotographic image forming unit is known.
A technique for controlling a motor(s) that drives a sheet conveying unit of such an image forming apparatus using a plurality of controllers is known. For instance, motor drive control may be performed using a master control unit and a slave control unit. The master control unit analyzes a control signal fed from a host controller and issues a command based on the control signal. The slave control unit controls a mechanical load, which is a control target, according to the command issued by the master control unit. Dividing the motor drive control to the master control unit and the slave control unit allows increasing the number of mechanical loads such as motors and sensors and reducing cost for the controllers that control the motors.
Meanwhile, to increase printing productivity of an image forming apparatus, it is required to control a sheet feed/conveyance system so as to convey sheets with narrow intervals between the sheets. Against the backdrop, Japanese Laid-open Patent Application No. 2002-284375 discloses a technique that causes a master control unit (engine control unit) to only schedule a next operation of a sheet feeding/conveying motor and causes a slave control unit (optional-apparatus control unit) to receive a signal from a position sensor that detects a sheet conveyance state and provides timing for the motor to perform the operation.
However, the conventional technique is disadvantageous in that delay can occur in motor operation. This is because timing control of the motor operation is executed by the master control unit by, as an interrupt detecting a state of the motor based on the signal output from the position sensor or the like and generating a control signal, and transmitting the control signal to the slave control unit.
More specifically, the master control unit receives a result of detection about the motor state from sensors or the like, and issues a command instructing the motor to perform an operation according to the received detection result. A period of time between when the detection result is received and when the command is issued undesirably becomes a time lag in the motor operation. This time lag can matter particularly greatly in such a situation as described above where a large number of sheets are consecutively conveyed with narrow intervals between the sheets.
In the technique disclosed in Japanese Laid-open Patent Application No. 2002-284375, while the master control unit schedules the next operation, the scheduled operation is performed after the master control unit carries out communications with the slave control unit according to the signal output from the position sensor. Accordingly, the technique cannot solve the disadvantage that the time lag, which depends the period of time from receipt of the signal of the position sensor to execution of the operation, occurs in the motor operation.
Therefore, it is desirable to reduce a time lag, which can occur when motor control is divided to a master control unit and a slave control unit, in motor operation.